package com.watchmen.mini.common.utils;

public enum ErrorMsg {
	
    SUCCESS("200","请求完成"),
    BAD_REQUEST("400","Bad Request!"),
    AUTH_FAIL("401","会话超时，重新登录"),
    AUTH_ERROR("402","用户信息遗失，请重新登陆！"),
    METHOD_NOT_ALLOWED("405","Method Not Allowed"),
    NOT_ACCEPTABLE("406","Not Acceptable"),
    SYSTEM_ERROR("500","系统错误"),

    SERVICE_RUNTIME_ERROR("1000","[服务器]运行时异常"),
    NULL_POINTER_ERROR("1001","[服务器]空值异常"),
    CLASS_CAST_ERROR("1002", "[服务器]数据类型转换异常"),
    SERVICE_IO_ERROR("1003", "[服务器]IO异常"),
    NOSUCH_METHOD_ERROR("1004", "[服务器]未知方法异常"),
    INDEX_OUT_OF_BOUNDS("1005", "[服务器]数组越界异常"),
    SERVICE_ERROR("1006", "[服务器]网络异常"),
    SQL_ERROR("1007", "[服务器]数据库或数据操作异常"),
    GET_DATA_ERROR("1008","获取数据异常"),
    EDIT_DATA_ERROR("1009","编辑数据异常"),

    USER_DISABLED("1010", "用户不存在"),
    USER_FOUND("1011", "用户已注册"),
    LOGIN_FAIL("1012", "用户名或密码错误"),
    USER_LOGIN_FALG("1013", "用户帐号冻结"),
    USER_EDITINFO_FAIL("1014", "用户信息编辑失败"),
    USER_INFO_LOSE("1015", "用户信息失效，请重新获取"),
    LOGOUT_SUCCESS("1017","登出成功"),
    REPEAT_SUBMIT("1018","重复提交"),
    PASS_WORD_ERROR("1019","密码错误"),
    USER_NOT_RES("1025","此用户手机号码正在审核，请耐心等待审核结果！"),
    USER_NOT_RES_USER("1026","此用户手机号码审核不通过，请重新绑定！"),
    OLD_PASS_WORD_ERROR("1021","原密码错误"),
    CAS_LOGIN_FAIL("1022", "系统认证服务错误。请稍后再试。"),
    USER_DEVICE_ERROR("1111", "因未在常用设备登录，需要通过短信验证，是否发送验证码？"),
    USER_LOCKED("1024", "您的账号已锁定，您可通过通过手机短信或邮箱验证码解锁。 <邮箱解锁>  <短信解锁>"),
    CHECK_DATA_SUCCESS("200","效验数据成功"),
    CHECK_DATA_ERROR("1031","效验数据失败"),
    CHECK_IDCARD_ERROR("1032","身份证格式错误"),
    OPTION_ERROR("2000","操作失败"),
    PARAMETER_NULL_ERROR("2010", "缺少参数或值为空"),
    PARAMETER__WRONGFUL_ERROR("2029", "参数不合法"),
    VERIFY_CODE_LOSE("2030","验证码过期"),
    VERIFY_CODE_ERROR("2031","验证码错误"),
    MOBILE_ERROR("2032","手机号错误"),
    VERIFY_ERROR("2033","绑定失败"),
    EMAIL_ADD_ERROR("2034","邮箱地址错误"),
    VERIFY_CODE_EMPTY_ERROR("2035","验证码不能为空"),
    NOT_BINGD_USER("2036","用户未绑定"),
    FILL_LOG_ERROR("3000","填写数据错误"),
    TOKEN_INVALID("3001", "token失效"),
    UNAUTHORIZED_ACCESS("3002", "无权限访问"),

    GROUP_INSERT_UNIQUENESS("5001","系统已有此数据，不可重复添加。"),//新建，主键唯一性检测
    GROUP_UPDATE_UNIQUENESS("5002","系统已有主键为[%s]的数据，不可重复添加。"),//修改，主键唯一性检测
    GROUP_CUCLE_CHECK("5003","数据对象[%s]周期时间与组定义不符,无法提交"),//周期定义检查
    GROUP_PRIMARYKEY_UNKNOWN("5004","从表没有定义主键，且数据不是唯一项，无法执行检查"),//主键未定义
    GROUP_ID_UNKNOWN("5005","错误的groupId:[%s]"),
    GROUP_VERSION_ID_UNKNOWN("5006","错误的groupVersionId:[%s]"),
    GROUP_TEMP_UNKNOWN("5007","所指定的组不在指定的填报模板下!"),
    GROUP_NOT_SINGLE_PRIMARYKEY("5008","数据组groupId:[%s] 中主不是单主键设置"),
    GROUP_SELECT_DATA_ERROR("5009","数据组groupId:[%s]根据主键:[%s]不能查询到数据或者查询到了错误的数据"),
    GROUP_UNREGISTERED("5010","group(versionId:%s)没有被登记过!"),
    GROUP_NOT_FIND_ITEM("5011","group(versionId:%s)不包含itemId%s的指标!"),
    GROUP_NOT_FIND_FILLLOG("5012","找不到需要入库的填写日志"),
    GROUP_ROW_NOT_FIND("5013","所选数据行不存在或者状态不为有效!"),
    GROUP_ROW_DATA_ANDTEMP_NOT_ATYPISM("5014","所选数据行不在同一个填报模板下!"),
    GROUP_ROW_ANDTEMP_NOT_ATYPISM("5015","所选数据行指标组不在同一个填报模板下!"),
    GROUP_VERSION_UNKNOWN("5016","未知的组版本!"),
    GROUP_VERSION_AND_DATA_UNKNOWN("5017","版本组与数据组不匹配!"),
    GROUP_CYLCE_UNKNOWM("5018","组[%s]数据中未包含周期!"),

    ;

    private String code;
    private String message;

    public String getCode(){
        return code;
    }
    
    public String getMessage(){
        return message;
    }

    ErrorMsg(String code, String message){
        this.code = code;
        this.message = message;
    }
}
